package com.gongj.appuser.controller;

import com.gongj.commons.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class RegisterController {

    @PostMapping("/register")
    public String register(User user){
        return "redirect:http://appUser/loginPage?name=" + user.getName();
    }

    @GetMapping("/loginPage")
    @ResponseBody
    public String loginPage(String name){
        return "loginPage:" + name;
    }
}
